Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plot.area in Series #670

Merged
merged 1 commit into from
Aug 22, 2019
Merged

Conversation

HyukjinKwon
Copy link
Member

This PR add series.plot.pie in Series.

Can be tested as below:

import databricks.koalas as ks
import pandas as pd

pdf = pd.DataFrame({
          'a': [1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 50],
      }, index=[0, 1, 3, 5, 6, 8, 9, 9, 9, 10, 10])

kdf = ks.DataFrame(pdf)
pdf['a'].plot.area(colormap='Paired').figure.savefig("image1.png")
kdf['a'].plot.area(colormap='Paired').figure.savefig("image2.png")

image2

In case of this plot, we sample and match the row numbers around 1000.

import databricks.koalas as ks
import pandas as pd

pdf = pd.DataFrame({'a': [1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 50, 100] * 100})
kdf = ks.DataFrame(pdf)
kdf['a'].plot.area(colormap='Paired').figure.savefig("image4.png")

image4

Partially addresses #665

... 'signups': [5, 5, 6, 12, 14, 13],
... 'visits': [20, 42, 28, 62, 81, 50],
... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
... freq='M'))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there are some bugs in lower pandas versions. I can't use existing test way in test_series_plot.py. It passes in my local but fails in Travis in certain condition (failed from pandas library).

@HyukjinKwon
Copy link
Member Author

I am merging this for today's release but please feel free to review after it's merged.

@softagram-bot
Copy link

Softagram Impact Report for pull/670 (head commit: c2e679a)

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Give feedback on this report to [email protected]

@HyukjinKwon HyukjinKwon merged commit 66aae2a into databricks:master Aug 22, 2019
@HyukjinKwon HyukjinKwon deleted the plot-area branch November 6, 2019 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants